package com.monitor.web.controller;


//import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.monitor.dal.XmlModel;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author tanlian
 * @Date 2018/12/21 16:27
 * @Desc
 */
@RestController
@RequestMapping("/xml")
public class XmlController {

    @RequestMapping(value = "/test",produces = MediaType.APPLICATION_XML_VALUE)
    public XmlModel xmlTest(){
        XmlModel xmlModel = new XmlModel();
        xmlModel.setKey("data");
        xmlModel.setValue("0");
        return xmlModel;
    }


}
